/**********************************************************
    COPYRIGHT
        KND, Inc. (c) 2011
    CLASS NAME
        platform_cpld.h
    DEPENDENCY

    HISTORY
		01/05/2012, created by Guangxing Liu
**********************************************************/
#ifndef PLATFORM_CPLD_H
#define PLATFORM_CPLD_H

#define CPLD_DEVICE           	 "CPLD"
#define CPLD_BASE_ADDRESS  0x90000000
#define CPLD_FREQ_CONST 16.6666f

#define CPLD_VID_REG 0x00
#define CPLD_STR_REG 0x01
#define CPLD_DOR_REG 0x02
#define CPLD_ZERO_REG 0x03
#define CPLD_STRAT_REG 0x04
#define CPLD_WRITE_FINISH_REG 0x0D

#define CPLD_X_CTR 0x05
#define CPLD_X_NUM 0x06
#define CPLD_Y_CTR 0x07
#define CPLD_Y_NUM 0x08
#define CPLD_Z_CTR 0x09
#define CPLD_Z_NUM 0x0A
#define CPLD_U_CTR 0x09
#define CPLD_U_NUM 0x0A



#define platform_cpld_app_call_device_op_cpldinit    	         "0_cpldinit"
#define platform_cpld_app_call_device_op_cpld_write_word    	"1_cpldwriteword"
#define platform_cpld_app_call_device_op_cpld_read_word    	"2_cpldreadword"


typedef enum{
	Platform_Cpld_App_Call_None = 0,
	Platform_Cpld_App_Call_Cpld_Init,
	Platform_Cpld_App_Call_Cpld_WriteWord,
	Platform_Cpld_App_Call_Cpld_ReadWord
	
}platform_cpld_device_opt;

typedef struct _platform_cpld_app_call_
{
	platform_cpld_device_opt iOpt;
	
}platform_cpld_app_call;


typedef struct _platform_cpld_value_
{
 	unsigned long Adr;
	unsigned short Data;

}platform_cpld_value;




































#endif